package com.tiro.springboot.sample.service.impl;

import com.googlecode.jsonrpc4j.spring.AutoJsonRpcServiceImpl;
import com.tiro.springboot.sample.common.UserStatus;
import com.tiro.springboot.sample.mapper.UserMapper;
import com.tiro.springboot.sample.po.User;
import com.tiro.springboot.sample.service.SampleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.util.List;

@Service
@AutoJsonRpcServiceImpl
public class SampleServiceImpl implements SampleService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUser(@NotNull @Positive Long id, @NotBlank String str, @NotEmpty List<@NotBlank String> list) {
        return userMapper.findByName("zs");
    }

    @Override
    public String hello2(@NotNull @Valid User user) {
        return null;
    }
}
